package com.yyge.common.exception;

import com.yyge.common.enums.AckCode;

/**
 * 自定义异常
 * @author Administrator
 */
public class ServiceException extends RuntimeException{
    private AckCode ackCode;

    public AckCode getAckCode() {
        return ackCode;
    }

    public ServiceException(AckCode ackCode) {
        super(ackCode.getMsg());
        this.ackCode = ackCode;
    }


    public ServiceException(String message, Throwable cause) {
        super(message, cause);
    }

    public ServiceException(Throwable cause) {
        super(cause);
    }

   public ServiceException (AckCode ackCode,String msg) {
     // 设置异常消息提示
     super (msg);
     this.ackCode = ackCode ;
  }
}
